﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Galaxy.AutoCAD.UserControls
{
    public partial class GalaxyToolSet : UserControl
    {
        public GalaxyToolSet()
        {
            InitializeComponent();
            #region toolbox设置
            //toolbox1设置
            this.toolbox1.Controls.Add(this.toolboxGroup1);
            this.toolbox1.Controls.Add(this.toolboxGroup2);
            this.toolbox1.Controls.Add(this.toolboxGroup3);
            this.toolbox1.Controls.Add(this.toolboxGroup4);
            this.toolbox1.Items.Add(this.toolboxGroup1);
            this.toolbox1.Items.Add(this.toolboxGroup2);
            this.toolbox1.Items.Add(this.toolboxGroup3);
            this.toolbox1.Items.Add(this.toolboxGroup4);
            #endregion
            #region toolboxGroup设置
            //toolboxGroup1设置
            this.toolboxGroup1.Controls.Add(this.toolboxItem11);
            this.toolboxGroup1.Controls.Add(this.toolboxItem12);
            this.toolboxGroup1.Controls.Add(this.toolboxItem13);
            this.toolboxGroup1.Controls.Add(this.toolboxItem14);
            this.toolboxGroup1.Controls.Add(this.toolboxItem15);
            this.toolboxGroup1.Controls.Add(this.toolboxItem16);
            this.toolboxGroup1.Controls.Add(this.toolboxItem17);
            this.toolboxGroup1.Controls.Add(this.toolboxItem18);
            this.toolboxGroup1.Items.Add(this.toolboxItem11);
            this.toolboxGroup1.Items.Add(this.toolboxItem12);
            this.toolboxGroup1.Items.Add(this.toolboxItem13);
            this.toolboxGroup1.Items.Add(this.toolboxItem14);
            this.toolboxGroup1.Items.Add(this.toolboxItem15);
            this.toolboxGroup1.Items.Add(this.toolboxItem16);
            this.toolboxGroup1.Items.Add(this.toolboxItem17);
            this.toolboxGroup1.Items.Add(this.toolboxItem18);
            //toolboxGroup2设置
            this.toolboxGroup2.Controls.Add(this.toolboxItem21);
            this.toolboxGroup2.Controls.Add(this.toolboxItem22);
            this.toolboxGroup2.Controls.Add(this.toolboxItem23);
            this.toolboxGroup2.Controls.Add(this.toolboxItem24);
            this.toolboxGroup2.Controls.Add(this.toolboxItem25);
            this.toolboxGroup2.Controls.Add(this.toolboxItem26);
            this.toolboxGroup2.Controls.Add(this.toolboxItem27);
            this.toolboxGroup2.Controls.Add(this.toolboxItem28);
            this.toolboxGroup2.Controls.Add(this.toolboxItem29);
            this.toolboxGroup2.Controls.Add(this.toolboxItem210);
            this.toolboxGroup2.Items.Add(this.toolboxItem21);
            this.toolboxGroup2.Items.Add(this.toolboxItem22);
            this.toolboxGroup2.Items.Add(this.toolboxItem23);
            this.toolboxGroup2.Items.Add(this.toolboxItem24);
            this.toolboxGroup2.Items.Add(this.toolboxItem25);
            this.toolboxGroup2.Items.Add(this.toolboxItem26);
            this.toolboxGroup2.Items.Add(this.toolboxItem27);
            this.toolboxGroup2.Items.Add(this.toolboxItem28);
            this.toolboxGroup2.Items.Add(this.toolboxItem29);
            this.toolboxGroup2.Items.Add(this.toolboxItem210);
            //toolboxGroup3设置
            this.toolboxGroup3.Controls.Add(this.toolboxItem31);
            this.toolboxGroup3.Items.Add(this.toolboxItem31);
            //toolboxGroup4设置
            this.toolboxGroup4.Controls.Add(this.toolboxItem41);
            this.toolboxGroup4.Items.Add(this.toolboxItem41);
            this.toolboxGroup4.Controls.Add(this.toolboxItem42);
            this.toolboxGroup4.Items.Add(this.toolboxItem42);
            this.toolboxGroup4.Controls.Add(this.toolboxItem43);
            this.toolboxGroup4.Items.Add(this.toolboxItem43);
            #endregion
        }

        private void toolboxItem11_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CCLL ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CPAL ", true, false, true);
        }

        private void toolboxItem12_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CDP ", true, false, true);
        }

        private void toolboxItem13_Click(object sender, EventArgs e)
        {

        }

        private void toolboxItem14_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CPA ", true, false, true);
        }

        private void toolboxItem15_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("DOR ", true, false, true);
        }

        private void toolboxItem21_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLHDB ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLGLDB ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLNL ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLWL ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLDDFB ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLOL ", true, false, true);
        }

        private void toolboxItem22_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLD ", true, false, true);
        }

        private void toolboxItem23_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("RLD ", true, false, true);
        }

        private void toolboxItem24_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLN ", true, false, true);
        }

        private void toolboxItem25_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("MLN ", true, false, true);
        }

        private void toolboxItem26_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLW ", true, false, true);
        }

        private void toolboxItem27_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLB ", true, false, true);
        }

        private void toolboxItem28_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLDDF ", true, false, true);
        }

        private void toolboxItem31_Click(object sender, EventArgs e)
        {

        }

        private void toolboxItem41_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CSSL ", true, false, true);
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("COSL ", true, false, true);
        }

        private void toolboxItem42_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("DSS ", true, false, true); 
        }

        private void toolboxItem43_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("DOS ", true, false, true);
        }

        private void toolboxItem16_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("BOP ", true, false, true);
        }

        private void toolboxItem29_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("CLO ", true, false, true);
        }

        private void toolboxItem210_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("SBSBL ", true, false, true);
        }

        private void toolboxItem17_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("ExplodeMText ", true, false, true);
        }

        private void toolboxItem18_Click(object sender, EventArgs e)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("ExplodeBlockInBlock ", true, false, true);
        }
    }
}
